<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加操作</title>
</head>
<body>
    <ul id="list">
        <li>张楚岚</li>
        <li>萧炎</li>
        <li>王林</li>
    </ul>
    <button id="add">添加</button>
</body>
<script>
    let addEle = document.getElementById("add");
    let listEle = document.getElementById("list");
    addEle.addEventListener("click",() => {
        // 创建节点
        let newLi = document.createElement("li");
        newLi.innerText = "伍六七";
        // 追加到ul内部后面： 父节点.appendChild(子节点)
        listEle.appendChild(newLi);
    });
</script>
</html>